const express = require('express');
const app = express();
const mysql = require('mysql')

const conn = mysql.createConnection({
    user:'root',
    password:'1234',
    host:'localhost',
    database:'vuecomponent_server'
})

conn.connect((err)=>{
    if(err){
        console.log('数据库连接失败:'+err);
        return; 
    }
    console.log('数据库连接成功');
})

app.listen(80,()=>{
    console.log('服务器启动成功');
})